package cn.edu.scau.cmi.zhangjunming.singleton;

public class Chairman{
	private static Chairman instance;
	private String name;
	private Chairman(String name) {
		this.name = name;
	}
	//创建实例
	public static Chairman getInstance(String name) {
		if(instance==null&&!name.equals(null)) {
			instance = new Chairman(name);
		}
		return instance;
	}
	//获取名字
	public String getName() {
		return name;
	}
}
